package com.carpedil.shirodemo.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carpedil.shirodemo.system.model.UserRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * Mapper 接口
 *
 * @author carpedil
 * @since 2021-01-05
 */
@Repository
public interface UserRoleMapper extends BaseMapper<UserRole> {

  /**
   * deleteUserRoleByUserId
   *
   * @param userId userId
   */
  int deleteUserRoleByUserId(@Param("userId") Integer userId);

  /**
   * insertRoleIds
   *
   * @param userId userId
   * @param roleIds roleIds
   */
  int insertRoleIds(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds);
}
